<?php
namespace app\admin\validate;


use think\Validate;

class Article extends Validate {

    protected $rule = [
        'art_title'   => 'require',
        'art_author'  => 'require',
        'art_sort'    => 'require|number|between:1,1000',
        'cate_id'     => 'notIn:0',
        'art_digest'  => 'require',
        'art_content' => 'require'

    ];

    protected $message = [
        'art_title.require'   => '请输入文章标题!',
        'art_author.require'  => '请输入文章作者!',
        'art_sort.require'    => '请输入文章排序!',
        'art_sort.number'     => '文章排序必须为数字!',
        'art_sort.between'    => '文章排序必须在1到1000之间!',
        'cate_id.notIn'       => '请选择文章所属分类!',
        'art_digest.require'  => '请输入文章摘要!',
        'art_content.require' => '请输入文章内容!'
    ];
}